package com.mera.tektronix.csviewer.services

import org.apache.commons.logging.LogFactory

import com.mera.tektronix.csviewer.common.api.*
import com.mera.tektronix.csviewer.common.dto.*
import com.mera.tektronix.csviewer.domain.*
import com.mera.tektronix.csviewer.transformers.ITransformer

class CompanyRemoteService implements ICompanyService {
	static transactional = true
	private static final log = LogFactory.getLog(CompanyRemoteService.class)
	
	ITransformer companyTransformer
	
	@Override
	CompanyDto getCompanyByName(String name) {
		Company company = Company.findByName(name)
		return companyTransformer.transformDomainToDto(company)
	}

	@Override
	CompanyDto getCompanyById(Long id) {
		Company company = Company.get(id);
		return companyTransformer.transformDomainToDto(company)
	}

}
